package com.ls.dao.storageRecord;

import com.ls.pojo.StorageRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StorageRecordMapper {
    int deleteBySupplierId(@Param("supplierId") Integer var1) throws Exception;

    int selectCountBySupplierId(@Param("supplierId") Integer var1) throws Exception;

    /**
     * 列表查询
     * @param supName
     * @param supplierId
     * @param payStatus
     * @param pageBegin
     * @param pageSize
     * @return
     * @throws Exception
     */
    public List<StorageRecord> selectList(@Param("goodsName") String supName, @Param("supplierId") Integer supplierId, @Param("payStatus") Integer payStatus
            , @Param("pageBegin") Integer pageBegin, @Param("pageSize") Integer pageSize) throws Exception;

    /**
     * 通过条件查询-订单表记录数
     * @param supName
     * @param supplierId
     * @param payStatus
     * @return
     * @throws Exception
     */
    public int selectCount(@Param("goodsName") String supName, @Param("supplierId") Integer supplierId, @Param("payStatus") Integer payStatus) throws Exception;

    /**
     * 增加订单
     * @param storageRecord
     * @return
     * @throws Exception
     */
    public int add(StorageRecord storageRecord) throws Exception;

    /**
     * 通过id获取供货单
     * @param id
     * @return
     * @throws Exception
     */
    public StorageRecord selectById(Integer id) throws Exception;

    /**
     * 修改订单信息
     * @param storageRecord
     * @return
     * @throws Exception
     */
    public int update(StorageRecord storageRecord) throws Exception;

    /**
     * 通过id删除订单信息
     * @param id
     * @return
     * @throws Exception
     */
    public int deleteById(Integer id) throws Exception;
}